package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacManagerDao;
import com.woniuxy.entity.RbacManager;
import com.woniuxy.service.RbacManagerServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 佘赛飞
 * @create 2021-11-24 12:02 下午
 */
@Service
public class RbacManagerServcieImpl implements RbacManagerServcie {
    @Autowired
    RbacManagerDao rbacManagerDao;
    @Override
    public List <RbacManager> findAll() {
        List <RbacManager> list = rbacManagerDao.findAll();
        for (RbacManager rbacManagerPerm : list) {
            System.out.println(rbacManagerPerm);
        }
        return list;
    }

    @Override
    public Integer addManager(RbacManager manager) {
        return rbacManagerDao.addManager(manager);
    }

    @Override
    public Integer Update(RbacManager manager) {
        return  rbacManagerDao.Update(manager);
    }

    @Override
    public void deleteManager(String id) {
        rbacManagerDao.deleteManager(id);
    }

    @Override
    public void deleteManager(RbacManager manager) {
        rbacManagerDao.deleteManager(manager);
    }

}
